/*
 * XML Type:  Portion
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Portion
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Portion(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PortionImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Portion
{
    
    public PortionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ASSETCLASS$0 = 
        new javax.xml.namespace.QName("", "ASSETCLASS");
    private static final javax.xml.namespace.QName PERCENT$2 = 
        new javax.xml.namespace.QName("", "PERCENT");
    
    
    /**
     * Gets the "ASSETCLASS" element
     */
    public net.ofx.types.x2003.x04.AssetClassEnum.Enum getASSETCLASS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSETCLASS$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.AssetClassEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "ASSETCLASS" element
     */
    public net.ofx.types.x2003.x04.AssetClassEnum xgetASSETCLASS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AssetClassEnum target = null;
            target = (net.ofx.types.x2003.x04.AssetClassEnum)get_store().find_element_user(ASSETCLASS$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "ASSETCLASS" element
     */
    public void setASSETCLASS(net.ofx.types.x2003.x04.AssetClassEnum.Enum assetclass)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSETCLASS$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ASSETCLASS$0);
            }
            target.setEnumValue(assetclass);
        }
    }
    
    /**
     * Sets (as xml) the "ASSETCLASS" element
     */
    public void xsetASSETCLASS(net.ofx.types.x2003.x04.AssetClassEnum assetclass)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AssetClassEnum target = null;
            target = (net.ofx.types.x2003.x04.AssetClassEnum)get_store().find_element_user(ASSETCLASS$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AssetClassEnum)get_store().add_element_user(ASSETCLASS$0);
            }
            target.set(assetclass);
        }
    }
    
    /**
     * Gets the "PERCENT" element
     */
    public java.lang.String getPERCENT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERCENT$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "PERCENT" element
     */
    public net.ofx.types.x2003.x04.RateType xgetPERCENT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RateType target = null;
            target = (net.ofx.types.x2003.x04.RateType)get_store().find_element_user(PERCENT$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "PERCENT" element
     */
    public void setPERCENT(java.lang.String percent)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERCENT$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERCENT$2);
            }
            target.setStringValue(percent);
        }
    }
    
    /**
     * Sets (as xml) the "PERCENT" element
     */
    public void xsetPERCENT(net.ofx.types.x2003.x04.RateType percent)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RateType target = null;
            target = (net.ofx.types.x2003.x04.RateType)get_store().find_element_user(PERCENT$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.RateType)get_store().add_element_user(PERCENT$2);
            }
            target.set(percent);
        }
    }
}
